-
Notifications
You must be signed in to change notification settings - Fork 547
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
helm & e2e: add option to enable read affinity for rbd #4111
helm & e2e: add option to enable read affinity for rbd #4111
Conversation
charts/ceph-csi-rbd/values.yaml
Outdated
- topology.rook.io/datacenter | ||
- topology.rook.io/room | ||
- topology.rook.io/pod | ||
- topology.rook.io/pdu | ||
- topology.rook.io/row | ||
- topology.rook.io/rack | ||
- topology.rook.io/chassis |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We can just have the above labels as examples.
These rook specific labels can be removed.
{{- if .Values.readAffinity.enabled }} | ||
- "--enable-read-affinity=true" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This will be problematic if we choose to enable it by default later for some reason and the user should be able to disable it
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@Madhu-1, I didn't get you on this. Can you explain bit more?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
{{- if .Values.readAffinity.enabled }} | |
- "--enable-read-affinity=true" | |
- "--enable-read-affinity={{ .Values.readAffinity.enabled }}" | |
{{- if .Values.readAffinity.enabled }} | |
- "--crush-location-labels={{ .Values.readAffinity.crushLocationLabels | join "," }}" | |
{{- end }} |
The above change will allow users to disable the ReadAffinity if its get enabled by default.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Okay, I got it
Thanks!
charts/ceph-csi-rbd/README.md
Outdated
@@ -176,6 +176,8 @@ charts and their default values. | |||
| `provisioner.podSecurityPolicy.enabled` | Specifies whether podSecurityPolicy is enabled | `false` | | |||
| `topology.enabled` | Specifies whether topology based provisioning support should be exposed by CSI | `false` | | |||
| `topology.domainLabels` | DomainLabels define which node labels to use as domains for CSI nodeplugins to advertise their domains | `{}` | | |||
| `readAffinity.enabled` | Enable read affinity for RBD volumes. Recommended to set to true if running kernel 5.8 or newer. | `false` | | |||
| `readAffinity.crushLocationLabels` | Define which node labels to use as CRUSH location. This should correspond to the values set in the CRUSH map. | labels listed [here](https://github.com/rook/rook/blob/master/Documentation/CRDs/Cluster/ceph-cluster-crd.md#osd-topology) | |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can you point to the ceph doc instead of the Rook doc for this one? if not, this can never be used with regular ceph clusters?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Praveen, The default is empty list []
,
add a sentence "For more information, click [here]"
https://github.com/ceph/ceph-csi/blob/v3.9.0/docs/deploy-rbd.md#read-affinity-using-crush-locations-for-rbd-volumes
Users can refer to this section for more details
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@Rakshith-R, I have made the changes
daea852
to
cfaf65c
Compare
0e4176a
to
d1d3627
Compare
e2e/deployment.go
Outdated
|
||
// enable read affinity support (for RBD) | ||
enableReadAffinity bool | ||
crushLocationLabels string |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hi @Madhu-1,
golangci-lint is faling because of maligned struct
e2e/deployment.go:233:29: struct of size 80 bytes could be of size 72 bytes:
struct{
filename string,
namespace string,
domainLabel string,
crushLocationLabels string,
oneReplica bool,
enableTopology bool,
enableReadAffinity bool,
}
``` (maligned)
type yamlResourceNamespaced struct {
Do we reorder as suggested?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yes it's best to do it as suggested.
78b0ab9
to
2cdf37f
Compare
/test ci/centos/mini-e2e/k8s-1.26 |
/test ci/centos/mini-e2e-helm/k8s-1.26 |
/test ci/centos/mini-e2e-helm/k8s-1.27 |
/test ci/centos/mini-e2e/k8s-1.27 |
/test ci/centos/mini-e2e/k8s-1.28 |
/test ci/centos/mini-e2e-helm/k8s-1.28 |
@Rakshith-R, example - |
It'll be great to parse and verify the key value pairs too. |
feee4ed
to
ae0d73b
Compare
/test ci/centos/mini-e2e/k8s-1.26 |
/test ci/centos/mini-e2e/k8s-1.27 |
/test ci/centos/mini-e2e/k8s-1.28 |
1 similar comment
/test ci/centos/mini-e2e/k8s-1.28 |
/test ci/centos/mini-e2e-helm/k8s-1.26 |
/test ci/centos/mini-e2e-helm/k8s-1.27 |
/test ci/centos/mini-e2e-helm/k8s-1.28 |
This commit adds --enable-read-affinity flag to enable read affinity for rbd Signed-off-by: Praveen M <m.praveen@ibm.com>
e2e test case is added to test if read affinity is enabled by verifying read_from_replica=localize option is passed Signed-off-by: Praveen M <m.praveen@ibm.com>
c07d242
to
64e8736
Compare
Pull request has been modified.
@iPraveenParihar you can use https://docs.mergify.com/commands/rebase to rebase, It'll preserve the approvals. |
@Mergifyio queue |
❌ Command disallowed due to command restrictions in the Mergify configuration.
|
@Mergifyio queue |
✅ The pull request has been merged automaticallyThe pull request has been merged automatically at 6719d64 |
/test ci/centos/k8s-e2e-external-storage/1.28 |
/test ci/centos/k8s-e2e-external-storage/1.26 |
/test ci/centos/upgrade-tests-cephfs |
/test ci/centos/mini-e2e-helm/k8s-1.28 |
/test ci/centos/mini-e2e-helm/k8s-1.26 |
/test ci/centos/mini-e2e/k8s-1.28 |
/test ci/centos/upgrade-tests-rbd |
/test ci/centos/k8s-e2e-external-storage/1.27 |
/test ci/centos/mini-e2e/k8s-1.26 |
/test ci/centos/mini-e2e-helm/k8s-1.27 |
/test ci/centos/mini-e2e/k8s-1.27 |
Describe what this PR does
helm: add option to enable read affinity for rbd
This commit adds --enable-read-affinity flag to
enable read affinity for rbd
e2e: added test to verify read affinity functionality
e2e test case is added to test if read affinity is enabled by
verifying
read_from_replica=localize
option is passed.Closes: #3642